/*********************************************************************************
 *      Copyright:  (C) 2022 Li Yanting<liyanting2@163.com>
 *                  All rights reserved.
 *
 *       Filename:  pub_json_data.h
 *    Description:  This file 
 *                 
 *        Version:  1.0.0(06/28/2022)
 *         Author:  Li Yanting <liyanting2@163.com>
 *      ChangeLog:  1, Release initial version on "06/28/2022 08:15:53"
 *                 
 ********************************************************************************/
#ifndef _PACK_DATA_H_
#define _PACK_DATA_H_

#include <errno.h>
#include "cJSON.h"
#include "get_ctx_conf.h"
#include "pack_data.h"


/*********************************************************************************
 *      Function name:  pack_data
 *        Description:  Package JSON format
 *         @parameter:  st_iotd  Structure of data to be packaged
 *         @parameter:  put_json_data  buf for json
 *       Return value:  On error, -1 is returned. On success, time is returned.
 ********************************************************************************/
int pack_data(iotd_ctx_t *st_iotd, char *put_json_data);

#endif